package com.test.springboot.springBootUtils.exception;

import lombok.Getter;

/**
 * 接口异常处理
 * @author huyong
 *
 *
 */
@Getter
public class APIException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	private int code;
	private String msg;

	public APIException(int code, String msg) {
		super();
		this.code = code;
		this.msg = msg;
	}

	public APIException() {
		this(1001, "接口错误");
	}

	public APIException(String msg) {
		this(1001, msg);
	}

}
